/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sims.databaseconnection;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author BinhMV
 */
public class Connector {
    public Connection connect() throws Exception {
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
        String url = "jdbc:sqlserver://localhost:1342;databaseName=SIMS";
        String username = "sa";
        String password = "123456";
//        String url = "jdbc:sqlserver://lab2_server:1433;databaseName=SIMS";
//        String username = "sa";
//        String password = "fat123456@";
        return DriverManager.getConnection(url, username, password);
    }
}
